/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package device;


public class Monitor extends Device{
    private int resolutionX;
    private int resolutionY;

    public Monitor(int resolutionX, int resolutionY, String manufacturer, float price, String serialNumber) {
        super(manufacturer, price, serialNumber);
        this.resolutionX = resolutionX;
        this.resolutionY = resolutionY;
        
    }

    public int getResolutionX() {
        return resolutionX;
    }

    public void setResolutionX(int resolutionX) {
        this.resolutionX = resolutionX;
    }

    public int getResolutionY() {
        return resolutionY;
    }

    public void setResolutionY(int resolutionY) {
        this.resolutionY = resolutionY;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Monitor other = (Monitor) obj;
        if (this.resolutionX != other.resolutionX) {
            return false;
        }
        if (this.resolutionY != other.resolutionY) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 11 * hash + this.resolutionX;
        hash = 11 * hash + this.resolutionY;
        return hash;
    }

    @Override
    public String toString() {
        return  "Monitor{" + super.toString() + " resolutionX=" + resolutionX + ", resolutionY=" + resolutionY + '}';
    }

}
